package com.pxxy.toturial.entity;

import java.io.Serializable;
import java.util.Objects;

/******************
 * @Author yejf
 * @Description TODO
 */
public class Cpu  implements Serializable {

    private Integer id;

    private int coreCount; //核心数

    private int threadCount; //线程数

    private String brand; //品牌

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Cpu{");
        sb.append("id=").append(id);
        sb.append(", coreCount=").append(coreCount);
        sb.append(", threadCount=").append(threadCount);
        sb.append(", brand='").append(brand).append('\'');
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Cpu cpu = (Cpu) o;
        return coreCount == cpu.coreCount &&
                Objects.equals(id, cpu.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, coreCount);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getCoreCount() {
        return coreCount;
    }

    public void setCoreCount(int coreCount) {
        this.coreCount = coreCount;
    }

    public int getThreadCount() {
        return threadCount;
    }

    public void setThreadCount(int threadCount) {
        this.threadCount = threadCount;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }
}
